package com.cloud.yangfeiself.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.stream.binder.BinderFactory;
import org.springframework.cloud.stream.messaging.DirectWithAttributesChannel;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

/**
 * spring 上下文bean配置修改
 *
 * @author Yang Fei
 * @date 2021/3/11
 */
@Configuration
public class SpringBeanConfig {


    @Order(value = Ordered.HIGHEST_PRECEDENCE)
    public DirectWithAttributesChannel directWithAttributesChannel(@Autowired BinderFactory binderFactory,
                                                                   @Value("${mq.type}") String mqType) {
//        directWithAttributesChannel.bin
        System.out.println("-------------华丽的分割线---------------");
        return null;
    }
}
